﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace devtm.CommonInteractive.Types
{

    [Serializable()]
    public class TypeGenericExpression : TypeExpression
    {

        [System.Diagnostics.DebuggerStepThrough()]
        public TypeGenericExpression(BuildTypeExpression expression)
            : base(expression)
        {
           
        }


        internal protected override void Parse()
        {

            while (TokenType.EndOfFile != _lexicalAnalyzer.MoveNext())
            {

                ExpressionValue = GetExpression();

                if (Generic - Liste.Count > 0)
                    Add(ExpressionValue);

                ExpressionValue.Parse();

                if (Generic > 0 && Generic - Liste.Count == 0)
                {
                    _lexicalAnalyzer.MoveNext();
                    TypeName += _lexicalAnalyzer.Value;
                    break;
                }

            }

        }

    }
}
